package com.yllt4cloud.shangmi.biz.control;

import com.yllt4cloud.common.core.annotation.Inner;
import com.yllt4cloud.common.core.util.ResultResp;
import com.yllt4cloud.shangmi.biz.service.IKaoQinJiLuService;
import com.yllt4cloud.shangmi.biz.util.SystemConfigRedisUtil;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: yaoxj
 * @create: 2019-12-19 20:07
 **/
@RestController
@AllArgsConstructor
@RequestMapping("/kaoqin")
public class KaoQinAct {
    IKaoQinJiLuService kaoQinJiLuService;
    SystemConfigRedisUtil systemConfigRedisUtil;

    @Inner
    @GetMapping("/countChuQin/{kaoqing}")
    public ResultResp info(@PathVariable String kaoqing) {
        System.out.println("kaoqingri==shangmi==="+kaoqing);
        String kaoQinRiQi=systemConfigRedisUtil.getWorkDateString();
        return new ResultResp<>(kaoQinJiLuService.countKaoQinJiLu(kaoQinRiQi));
//        return Response.success(kaoQinJiLuService.countKaoQinJiLu(kaoQinRiQi));
    }

}
